package model;

// Generated Jun 9, 2011 1:02:18 PM by Hibernate Tools 3.4.0.CR1

import java.util.HashSet;
import java.util.Set;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.Table;

/**
 * Serviciiasistat generated by hbm2java
 */
@Entity
@Table(name = "serviciiasistat", catalog = "mydb")
public class Serviciiasistat implements java.io.Serializable {

	private Integer serviciuId;
	private String serviciu;
	private Integer cost;
	private Set<Asistat> asistats = new HashSet<Asistat>(0);

	public Serviciiasistat() {
	}

	public Serviciiasistat(String serviciu, Integer cost, Set<Asistat> asistats) {
		this.serviciu = serviciu;
		this.cost = cost;
		this.asistats = asistats;
	}

	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "serviciu_id", unique = true, nullable = false)
	public Integer getServiciuId() {
		return this.serviciuId;
	}

	public void setServiciuId(Integer serviciuId) {
		this.serviciuId = serviciuId;
	}

	@Column(name = "serviciu", length = 200)
	public String getServiciu() {
		return this.serviciu;
	}

	public void setServiciu(String serviciu) {
		this.serviciu = serviciu;
	}

	@Column(name = "cost")
	public Integer getCost() {
		return this.cost;
	}

	public void setCost(Integer cost) {
		this.cost = cost;
	}

	@ManyToMany(fetch = FetchType.LAZY)
	@JoinTable(name = "asistat_has_serviciiasistat", catalog = "mydb", joinColumns = { @JoinColumn(name = "ServiciiAsistat_serviciu_id", nullable = false, updatable = false) }, inverseJoinColumns = { @JoinColumn(name = "Asistat_asistat_id", nullable = false, updatable = false) })
	public Set<Asistat> getAsistats() {
		return this.asistats;
	}

	public void setAsistats(Set<Asistat> asistats) {
		this.asistats = asistats;
	}

}
